import { BroadCastCall } from "../../broadCast/BroadCastCall";
import { MessageBlock } from "../../../../../Framework/MQ/MessageBlock";
import { SGuildTreeRing } from "../../../../../Message/Game/SGuildTreeRing";
import { NetDispatcher } from "../../../../mvc/core/NetDispatcher";
import { ServerCommand } from "../../../mvc/ServerCommand";
//class GuildTreeWormCommand
    
    export  class GuildTreeWormCommand extends BroadCastCall
    {
        constructor(arg1: Object)
        {
            super(arg1);
            return;
        }

        public /* override */ call(arg1: MessageBlock): void
        {
            super.call(arg1);
            var loc1=arg1.messageBase as SGuildTreeRing;
            if (loc1.ring > loc1.maxRing) 
            {
                loc1 = null;
            }
            _cache.guild.guildTreeWormRing = loc1;
            NetDispatcher.dispatchCmd(ServerCommand.GuildTreeWormCommand, loc1);
            return;
        }
    }
